package com.mornd.gulimall.product.web.test;

import com.mornd.gulimall.product.entity.Brand;
import com.mornd.gulimall.product.service.ICacheService;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

/**
 * @author: mornd
 * @dateTime: 2023/8/13 - 1:56
 */

@RestController
@RequestMapping("/cache")
public class CacheController {
    @Resource
    private ICacheService cacheService;


    @GetMapping("/brands")
    public Object brands() {
        return cacheService.brandList();
    }

    @GetMapping("/delete")
    public Object delete() {
        cacheService.delete();
        return "ok";
    }
}
